﻿<form id="edituserform" data-bind="submit: save.execute" class="form-horizontal">
<fieldset>
    <legend data-bind="text: title"></legend>
     <!-- ko with: item -->

    <div class="control-group">
        <label for="FirstName" class="control-label">@Loc.FirstName</label>
        <div class="controls">
            <input data-bind="value: FirstName" id="FirstName" class="input-xlarge focused" autofocus=""autocomplete="off" type="text" name="FirstName" />
            <span class="error" data-bind="validationPopover: FirstName"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="LastName" class="control-label">@Loc.LastName</label>
        <div class="controls">
            <input data-bind="value: LastName" id="LastName" class="input-xlarge" autocomplete="off" type="text" name="LastName" />
            <span class="error" data-bind="validationPopover: LastName"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="Email" class="control-label">@Loc.Email</label>
        <div class="controls">
            <input data-bind='value: Email, enable: !Id' id="Email" class="input-xlarge" autocomplete="off" type="text" name="Email" />
            <span class="error" data-bind="validationPopover: Email"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="Role" class="control-label">Role</label>
        <div class="controls">
            <input type="text" class="input-xlarge" style="width: 280px;" id="Role" value="13" name="Role" data-bind="value: Role, select2: $parent.roles, initText: RoleName" />
            <span class="error" data-bind="validationPopover: Role"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="Password" class="control-label">@Loc.Password</label>
        <div class="controls">
            <input data-bind="value: Password" id="Password" class="input-xlarge" autocomplete="off" type="password" name="Password" />
            <span class="error" data-bind="validationPopover: Password"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="PasswordConfirm" class="control-label">@Loc.PasswordConfirm</label>
        <div class="controls">
            <input data-bind="value: PasswordConfirm" id="PasswordConfirm" class="input-xlarge" autocomplete="off" type="password" name="PasswordConfirm" />
            <span class="error" data-bind="validationPopover: PasswordConfirm"></span>
        </div>
    </div>
    <div class="control-group">
        <label for="Description" class="control-label">@Loc.Description</label>
        <div class="controls">
            <textarea id="Description" rows="5" name="Description" data-bind="value: Description"></textarea>
        </div>
    </div>
    <input type="hidden" data-bind="value: Id" name="Id"/>
        <!-- /ko -->
    <div class="form-actions">
        <button class="btn btn-primary" data-bind="command: save, activity: save.isExecuting" type="submit">save</button>
        <a class="btn" href="#view=userList">cancel</a>
    </div>
</fieldset>
</form>
